package com.sntk.registermanager.staff.application.dispatch;

import com.alibaba.fastjson.JSON;
import com.sntk.registermanager.staff.application.dto.DoctorInfoDTO;
import com.sntk.registermanager.staff.query.DoctorInfoQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author liuyunxia
 */
@Component
public class DoctorInfoDispatch {

    @Autowired
    private DoctorInfoQuery doctorInfoQuery;

    //查询所有医生
    public String searchAllDoctor(){
        List<DoctorInfoDTO> dtos = doctorInfoQuery.searchAllDoctor();
        if(dtos == null){
            return null;
        }
        return JSON.toJSONString(dtos);
    }

    /**
     * 查询医生信息
     * @param doctorCode
     * @return
     */
    public String searchDoctor(String doctorCode){

        return null;
    }


}
